package com.zqxq.lottery.service.user.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.zqxq.common.constant.Result;
import com.zqxq.common.enums.CodeEnum;
import com.zqxq.common.utils.DispatcherUtils;
import com.zqxq.lottery.config.WechatConfig;
import com.zqxq.lottery.entity.po.order.TradeInfoPO;
import com.zqxq.lottery.entity.po.user.UserBindPO;
import com.zqxq.lottery.entity.po.user.UserFundsPO;
import com.zqxq.lottery.entity.po.user.UserWechatPO;
import com.zqxq.lottery.mapper.user.UserBindMapper;
import com.zqxq.lottery.mapper.user.UserFundsMapper;
import com.zqxq.lottery.mapper.user.UserWechatMapper;
import com.zqxq.lottery.service.order.ITradeInfoService;
import com.zqxq.lottery.service.user.IUserBindService;
import com.zqxq.lottery.service.user.IUserFundsService;
import com.zqxq.lottery.service.user.IUserWechatService;
import com.zqxq.lottery.util.CertHttpUtil;
import com.zqxq.lottery.util.WechatUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;


@Service
@Slf4j
public class UserBindServiceImpl extends ServiceImpl<UserBindMapper,UserBindPO> implements IUserBindService {
    @Override
    public void bindRelationship(long userId, String openId) {
        UserBindPO userBindPO = new UserBindPO();
        userBindPO.setUser_id(userId);
        userBindPO.setOpen_id(openId);
        userBindPO.setId(userId);
        insertOrUpdate(userBindPO);
    }
}
